import requst from '@/utils/request'
import axios from 'axios'
export const UserLoginService = ({ username, password }) =>
  requst.post('/login', { username, password })
  

export const UserRegisterService = ({ username, password }) => {
    return requst.post('/registry', { username, password })
  }

export const UserLogoutService = () => {
   return requst.get('/logout')
  }
   //获取账户信息
   export const userGetAccountInfoService = (id) => {
    return requst.get(`/account/info?id=${id}`)
   }
   //修改账户信息
   export const userUpdateAccountInfoService = (data) => {
    return requst.put('/account/info',data)
   }
   //上传文件
   export const userUploadMessageService = (data) => {
    return axios.request({
      method: 'post',
      url: 'http://192.168.31.208:8084/upload',
      Headers: {
        'Content-Type': 'multipart/form-data'
      },
      data: data
    })
   }
